#sing @echo on & SetLocal EnableDelayedExpansion
#newl#sing set length=30|#newl#sing set length=450|--Max width. There is no space at the end.--
#newl#sing set pieces=3|#newl#sing set pieces=10|#newl#sing set pieces=5|
#newl FOR /L %%I IN (1,1,!pieces!) DO (
#newl set /a i_minus_1=%%I-1
#newl set /a current_start=!i_minus_1!*!length!
#newl set Z=0& if %%I GTR 9 set Z=
#newl "#ppthapps\ffmpeg\ffmpeg.exe" |-program file-
-ss !current_start! |-ss 00:02:00 |-ss 120 |-Start time. Optional. HH:MM:SS, or seconds-
-i "#item" |-i "#item" -i "#path#name.mp2" |-i "#item" -i "#path#name.mp3" |-i "#item" -i "#path#name.aac" |-i "#item" -i "#path#name.wav" |-i "#item" -i "#path#name.mpa" |-i "#item" -r 1 -loop_input -i "d:\picture.jpg" -shortest |-input, or encode with alternate audio source file-
-vcodec copy |-vcodec mpeg4 |-vcodec libxvid |-vn |-vcodec libx264 |-vcodec-
#remark -video tag-|-vtag XVID |-vtag DIVX |-vtag H264 |-vtag AVC1 |-Video tag-
#remark -cpu threads-|-threads 2 |-threads 0 |-threads 1 |-cpu threads. zero means auto (when supported, like x264)-
#remark -scaling type-|-sws_flags fast_bilinear |-scaling type-
-acodec copy |-acodec mp2 |-acodec libmp3lame |-acodec pcm_s16le |-acodec aac -strict experimental |-acodec libvorbis |-an |--Acodec. Use mkv or mp4 as output when using aac.--
#remark -acodec bitrate|-ab 128k |-ab 96k |-ab 160k |-ab 192k |-ab 64k |-aq 6 |-aq 5 |--acodec bitrate. Vorbis: aq5= ~128, aq6= ~224--
#remark -channels-|-ac 1 |-ac 2 |-channels-
#remark -resample_audio-|-ar 22050 |-ar 44100 |-ar 48000 |--resample audio--
#remark -resize-|-s 512x384 |-s 480x270 |-s 320x240 |-s 640x480 |-resize-
#remark -aspect ratio-|-aspect 16:9 |-aspect 16:10 |-aspect 4:3 |--aspect ratio--
-t !length! |-t 00:01:00 |-t 10 |-vframes 250 |-endtime-
#remark -overwrite-|-y |-overwrite existing file-
#remark -scodec copy subtitles-|-scodec copy 
#remark -output_fps-|-r 24 |-r 23.97 |-r 25 |-r 29.97 |-r 30 |-r 24000/1001 |--output fps--
"#path#name-ffm-!Z!%%I#exte" |"#path#name-ffm-!Z!%%I#exte" |"#path#name-ffm-!Z!%%I.mp4" |"#path#name-ffm-!Z!%%I.avi" |"#path#name-ffm-!Z!%%I.mkv" |-output-
#newl )
#newl 



<comment>
Split video files.
Select length, and number of pieces (3 default. Increase it if you want).



'-ss position (input/output)'
When used as an input option (before -i), seeks in this input file to position. 
When used as an output option (before an output filename), decodes but discards 
input until the timestamps reach position. This is slower, but more accurate.
position may be either in seconds or in hh:mm:ss[.xxx] form.

you get out of sync in file 2 if you use "-i, -ss."
So use "-ss, -i".
